package com.lagou.edu.controller;

import com.lagou.edu.serivce.ISendEmailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.mail.javamail.JavaMailSenderImpl;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/email")
public class SendEmailController {

    @Autowired
    private ISendEmailService sendEmailService;


    @GetMapping("/sendCode/{email}/{code}")
    public boolean sendCode(@PathVariable String email, @PathVariable String code){
        boolean result = sendEmailService.sendEmailCode(email, code);
        return result;
    }

}
